package com.jiepos.mpos.core.entity;

import java.io.Serializable;

import com.jiepos.mpos.common.constant.ExceptionConstant;

/**
 * @ClassName: MposResponse
 * @Description: 系统响应实体
 * @author 孙永
 * @date 2017年9月26日 下午8:44:05
 */
public class MposResponse implements Serializable{

	private static final long serialVersionUID = -1712404388451834461L;
	
	/** 响应编码*/
	private String respCode;
	
	/** 响应描述*/
	private String respMsg;
	
	/** 响应数据*/
	private Object respData;

	public String getRespCode() {
		return respCode;
	}

	public void setRespCode(String respCode) {
		this.respCode = respCode;
	}

	public String getRespMsg() {
		return respMsg;
	}

	public void setRespMsg(String respMsg) {
		this.respMsg = respMsg;
	}

	public Object getRespData() {
		return respData;
	}

	public void setRespData(Object respData) {
		this.respData = respData;
	}
	
	public void setException(ExceptionConstant exceptionConstant){
		this.respCode = exceptionConstant.getCode();
		this.respMsg = exceptionConstant.getMessage();
	}
	
	public MposResponse(){
		this.respCode = ExceptionConstant.SUCCESS.getCode();
		this.respMsg = ExceptionConstant.SUCCESS.getMessage();
	}
	
	public MposResponse(ExceptionConstant exceptionConstant){
		this.respCode = exceptionConstant.getCode();
		this.respMsg = exceptionConstant.getMessage();
	}
}
